<!DOCTYPE html>
<html lang="zh-CH" >
<head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <meta name="author" content="" />
	
	
	
	<title>Unity_ShaderGraph 节点之 Channel Nodes ｜ zansimple</title>
	
    
    
    <meta name="description" content="Combine 组合 可以从 RGBA 重新组合一个新的向量
RGBA = float4(R, G, B, A);RGB = float3(R, G, B);RG = float2(R, G); Flip 翻转 反转各个值（变为相反值），可以选择一个或多个通道进行反转。 Split 分割 将一个多维向量分割成多个1维的数值。如果输入的向量小于4维，不够的维度会使用默认值分别是 (0, 0, 0, 1)。 Swizzle 打乱 从输入的向量创建一个新的向量，但是可以根据下拉参数打乱输出的维度。" />
    

    

	
    
    <link rel="shortcut icon" href="https://lenzan.github.io/images/favicon.ico" />

    <link rel="stylesheet" type="text/css" media="screen" href="https://lenzan.github.io/css/normalize.css" />
    <link rel="stylesheet" type="text/css" media="screen" href="https://cdn.jsdelivr.net/npm/animate.css@4.1.0/animate.min.css" />
    <link rel="stylesheet" type="text/css" media="screen" href="https://lenzan.github.io/css/zozo.css" />
	<link rel="stylesheet" type="text/css" media="screen" href="https://cdn.jsdelivr.net/npm/remixicon@2.5.0/fonts/remixicon.css" />
    <link rel="stylesheet" type="text/css" media="screen" href="https://lenzan.github.io/css/highlight.css" />

    
    
</head>

<body>
    <div class="main animate__animated animate__fadeInDown">
        <div class="nav_container animated fadeInDown">
    <div class="site_nav" id="site_nav">
        <ul>
            
            <li>
                <a href="/">首页</a>
            </li>
            
            <li>
                <a href="/">unity</a>
            </li>
            
            <li>
                <a href="/">归档</a>
            </li>
            
            <li>
                <a href="/">关于</a>
            </li>
            
        </ul>
    </div>
    <div class="menu_icon">
        <a id="menu_icon"><i class="ri-menu-line"></i></a>
    </div>
</div>
        <div class="header animated fadeInDown">
    <div class="site_title_container">
        <div class="site_title">
            <h1>
                <a href="https://lenzan.github.io/">
                    <span>zansimple</span>
                    <img src="https://lenzan.github.io/images/logo.svg" />
                </a>
            </h1>
        </div>
        <div class="description">
            <p class="sub_title">专注于Unity虚拟现实开发，游戏开发</p>
            <div class="my_socials">
                
                <a href="https://lenzan.github.io/index.xml" type="application/rss+xml" title="rss" target="_blank"><i
                        class="ri-rss-fill"></i></a>
            </div>
        </div>
    </div>
</div>
        <div class="content">
            <div class="post_page">
                <div class="post animate__animated animate__fadeInDown">
                    <div class="post_title post_detail_title">
                        <h2><a href='/posts/shadergraph/ShaderGraph_Channel-Nodes/'>Unity_ShaderGraph 节点之 Channel Nodes</a></h2>
                        <span class="date">2018.08.24</span>
                    </div>
                    <div class="post_content markdown"><h3 id="combine-组合">Combine 组合</h3>
<p>可以从 RGBA 重新组合一个新的向量<br>
<img src="/img/shadergraph/Channel/combine.png" alt="combine"></p>
<pre><code>RGBA = float4(R, G, B, A);
RGB = float3(R, G, B);
RG = float2(R, G);
</code></pre>
<h3 id="flip-翻转">Flip 翻转</h3>
<p>反转各个值（变为相反值），可以选择一个或多个通道进行反转。 <br>
<img src="/img/shadergraph/Channel/flip.png" alt="flip"></p>
<h3 id="split-分割">Split 分割</h3>
<p>将一个多维向量分割成多个1维的数值。如果输入的向量小于4维，不够的维度会使用默认值分别是 (0, 0, 0, 1)。  <br>
<img src="/img/shadergraph/Channel/split.png" alt="split"></p>
<h3 id="swizzle-打乱">Swizzle 打乱</h3>
<p>从输入的向量创建一个新的向量，但是可以根据下拉参数打乱输出的维度。<br>
<img src="/img/shadergraph/Channel/swizzle.png" alt="swizzle"></p>
</div>
                    <div class="post_footer">
                        
                        <div class="meta">
                            <div class="info">
                                <span class="field tags">
                                    <i class="ri-stack-line"></i>
                                    
                                    <a href="https://lenzan.github.io/tags/Unity3D/">Unity3D</a>
                                    
                                    <a href="https://lenzan.github.io/tags/Shader/">Shader</a>
                                    
                                    <a href="https://lenzan.github.io/tags/ShaderGraph/">ShaderGraph</a>
                                    
                                </span>
                            </div>
                        </div>
                        
                    </div>
                </div>
                
                
            </div>
        </div>
    </div>
    <a id="back_to_top" href="#" class="back_to_top"><span>△</span></a>
    <footer class="footer">
    <div class="powered_by">
        <a href="https://varkai.com">Designed by VarKai,</a>
        <a href="http://www.gohugo.io/">Proudly published with Hugo</a>
    </div>

    <div class="footer_slogan">
        <span></span>
    </div>
</footer>
    <script src="https://lenzan.github.io/js/jquery-3.5.1.min.js"></script>
<link href="https://lenzan.github.io/css/fancybox.min.css" rel="stylesheet">
<script src="https://lenzan.github.io/js/fancybox.min.js"></script>
<script src="https://lenzan.github.io/js/zozo.js"></script>






</body>

</html>